package com.competition.prediction.mapper;

import com.competition.prediction.entity.Competition;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CompetitionMapper {

    int insertCompetition(Competition competition);

    int updateCompetition(Competition competition);

    int deleteCompetitionById(Long id);

    Competition selectCompetitionById(Long id);

    List<Competition> selectCompetitionsByGameId(@Param("gameId") Long gameId);

    List<Competition> selectUpcomingCompetitions();

    List<Competition> selectOngoingCompetitions();

    List<Competition> selectFinishedCompetitions();
}